package com.electric.qrapp.entity.init

import android.content.Context
import androidx.startup.Initializer
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit


/**
 *@author created by WA03675
 *@date  2021-12-23 15:55
 *@des
 */
class RxhttpInitializer : Initializer<Unit> {
    companion object{
        const val timeOut = 50L;
        const val FileDownOut = 120L * 1000;//下载超时时间
    }

    override fun create(context: Context) {

    }

    //设置读、写、连接超时时间为15s
    private fun getOkHttpClient(): OkHttpClient {
        return OkHttpClient.Builder()
            .connectTimeout(timeOut, TimeUnit.SECONDS)
            .readTimeout(timeOut, TimeUnit.SECONDS)
            .writeTimeout(timeOut, TimeUnit.SECONDS)
            .build();
    }




    override fun dependencies(): MutableList<Class<out Initializer<*>>> {
        return mutableListOf()
    }

}
